#!/usr/bin/env python
# -*- coding:utf-8 -*-

from flask_restful import Api

from . import schedule_blueprint
from api.scheduleResource.scheduleResource import ScheduleResource
from api.scheduleResource.scheduleOtherResource import ScheduleOtherResource

api = Api(schedule_blueprint)

api.add_resource(ScheduleResource, '/schedule/<time_id>', '/schedule', endpoint='Schedule')


@schedule_blueprint.route('/schedule/update/<time_id>', methods=['PUT'], endpoint='ScheduleUpdate')
def update(time_id):
    return ScheduleOtherResource.sensitive_update(time_id)
